﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lawyer.Web
{
    public partial class archivedetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    string ArchiveID = Request.Params["id"];;
                    BindData(ArchiveID);
                }
            }
        }

        private void BindData(string ArchiveID)
        {
            BindArchive(ArchiveID);
        }
        private void BindArchive(string ArchiveID)
        {
            Lawyer.BLL.ArchiveInfo bll = new Lawyer.BLL.ArchiveInfo();
            Lawyer.Model.ArchiveInfo model = bll.GetModel(ArchiveID);
            //this.lblArchiveID.Text = model.ArchiveID;
            this.lblTitle.Text = model.Title;
            this.lblLawyerName.Text = model.LawyerName;
            this.lblCustomName.Text = model.CustomName;
            this.lblIsAgency.Text = model.IsAgency.ToString();
            this.lblAgencyName.Text = model.AgencyName;
            this.lblAgencyRate.Text = model.AgencyRate.ToString();
            this.lblEndDate.Text = model.EndDate.ToString();
            this.lblCreatedDate.Text = model.CreatedDate.ToString();
            this.lblCreatedBy.Text = model.CreatedBy;
            this.lblCheckedBy.Text = model.CheckedBy;
            this.lblCheckedDate.Text = model.CheckedDate.ToString();
            this.lblUpdatedDate.Text = model.UpdatedDate.ToString();
            this.lblUpdatedBy.Text = model.UpdatedBy;
        }

        private void BindBaseInfo(string ArchiveID)
        {
            Lawyer.BLL.ArchiveBaseInfo bll = new Lawyer.BLL.ArchiveBaseInfo();
            Lawyer.Model.ArchiveBaseInfo model = bll.GetModel(ArchiveID);
            //this.lblArchiveID.Text = model.ArchiveID;
            this.lblFullName.Text = model.FullName;
            this.lblBirthday.Text = model.Birthday.ToString();
            this.lblTelphone.Text = model.Telphone;
            this.lblFax.Text = model.Fax;
            this.lblAddress.Text = model.Address;
            this.lblCFullName.Text = model.CFullName;
            this.lblCBirthday.Text = model.CBirthday.ToString();
            this.lblCTelphone.Text = model.CTelphone;
            this.lblCFax.Text = model.CFax;
            this.lblCEmail.Text = model.CEmail;
            this.lblCRelation.Text = model.CRelation;
            this.lblBankFunds.Text = model.BankFunds.ToString();
            this.lblBankAccount.Text = model.BankAccount;
            this.lblCaseSource.Text = model.CaseSource;
            this.lblPersonalDetail.Text = model.PersonalDetail;
            this.lblPersonalNote.Text = model.PersonalNote;
            this.lblFatherName.Text = model.FatherName;
            this.lblFatherDOB.Text = model.FatherDOB.ToString();
            this.lblFatherNationality.Text = model.FatherNationality;
            this.lblFatherContact.Text = model.FatherContact;
            this.lblMotherName.Text = model.MotherName;
            this.lblMotherDOB.Text = model.MotherDOB.ToString();
            this.lblMotherNationality.Text = model.MotherNationality;
            this.lblMotherContact.Text = model.MotherContact;
            this.lblSisterName.Text = model.SisterName;
            this.lblSisterDOB.Text = model.SisterDOB.ToString();
            this.lblSisterContact.Text = model.SisterContact;
            this.lblSisterNationality.Text = model.SisterNationality;
            this.lblBrotherName.Text = model.BrotherName;
            this.lblBrotherDOB.Text = model.BrotherDOB.ToString();
            this.lblBrotherNationality.Text = model.BrotherNationality;
            this.lblBrotherContact.Text = model.BrotherContact;
            this.lblAgreedFees.Text = model.AgreedFees.ToString();
            this.lblFeesClusive.Text = model.FeesClusive.ToString();
            this.lblFeesFundable.Text = model.FeesFundable.ToString();
            this.lblPersonalStatement.Text = model.PersonalStatement;
            this.lblLawyerNote.Text = model.LawyerNote;
            this.lblAssetAName.Text = model.AssetAName;
            this.lblAssetAWorth.Text = model.AssetAWorth.ToString();
            this.lblAssetANote.Text = model.AssetANote;
            this.lblAssetADetail.Text = model.AssetADetail;
            this.lblAssetBName.Text = model.AssetBName;
            this.lblAssetBWorth.Text = model.AssetBWorth.ToString();
            this.lblAssetBNote.Text = model.AssetBNote;
            this.lblAssetBDetail.Text = model.AssetBDetail;
            this.lblAssetCName.Text = model.AssetCName;
            this.lblAssetCWorth.Text = model.AssetCWorth.ToString();
            this.lblAssetCNote.Text = model.AssetCNote;
            this.lblAssetCDetail.Text = model.AssetCDetail;
            this.lblUpdatedBy.Text = model.UpdatedBy;
            this.lblUpdatedDate.Text = model.UpdatedDate.ToString();
        }
    }
}
